package com.grandbroad.eim.ui.activities;

import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.grandbroad.eim.R;
import com.grandbroad.eim.base.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import cn.jiguang.net.HttpUtils;

public class EditActivity extends BaseActivity {


    @BindView(R.id.img_back_btn)
    ImageView imgBackBtn;
    @BindView(R.id.tv_toolbar_title)
    TextView tvToolbarTitle;
    @BindView(R.id.tool_bar)
    Toolbar toolBar;
    @BindView(R.id.edit_my_change)
    EditText editMyChange;
    private String MODE;
    @Override
    protected void initview() {
        chooseMode();
        setBackBtn(imgBackBtn);
    }

    @Override
    protected void initdata() {
        toolBar.setBackgroundColor(Color.WHITE);
        Bundle bundle = getIntent().getExtras();
        MODE = bundle.getString("mode",null);

    }

    private void chooseMode() {
     switch (MODE)
     {
         case UserInfoActivity.COMPANY:
             tvToolbarTitle.setText("修改公司");
             editMyChange.setHint("输入要修改的公司");
             break;
         case UserInfoActivity.DEPARTMENT:
             tvToolbarTitle.setText("修改所在部门");
             editMyChange.setHint("输入要修改的部门");
             break;
         case UserInfoActivity.POSITION:
             tvToolbarTitle.setText("修改职位");
             editMyChange.setHint("输入要修改的职位");
             break;
         case UserInfoActivity.SEX:
             tvToolbarTitle.setText("修改性别");
             editMyChange.setHint("输入要修改的性别");
             break;
         case UserInfoActivity.EMAIL:
             tvToolbarTitle.setText("修改邮箱");
             editMyChange.setHint("输入要修改的邮箱");
             break;
         case UserInfoActivity.NICKNAME:
             tvToolbarTitle.setText("修改昵称");
             editMyChange.setHint("输入要修改的昵称");
             break;
         case UserInfoActivity.PHONE:
             tvToolbarTitle.setText("修改电话");
             editMyChange.setHint("输入要修改的号码");
             break;
     }

    }

    @Override
    protected int setlayout() {
        return R.layout.activity_edit;
    }

}
